
<h2>设备列表</h2>
<div class="list">
<ul>
<?php
foreach($devlist as $k=>$dev):
     $style = ($k%2)?" class='odd'": " class='even'";
   ?>
<li <?=$style?> id="item-<?=$dev?>">
     设备号码:
     <?=$dev?>

<input type="button" onclick='dev_action(<?=$dev?>)' value="控制设备">
     </li>
<?php
   endforeach;
   ?>
</ul>
</div>
<div class="result" id="dev-action"></div>
